#ifndef QQCELL_H
#define QQCELL_H

#include <QWidget>
#include"qqcellline.h"
#include"qqcelltitle.h"
#include<QList>

#define QQ_CELL_WIDTH 300
#define QQ_TITLE_HEIGHT 30
#define QQ_LINE_HEIGHT 50

namespace Ui {
class QQCell;
}

class QQCell : public QWidget
{
    Q_OBJECT

public:
    explicit QQCell(const QString cellname,int offsetcelly,QWidget *parent = nullptr);
    ~QQCell();
    void addCellFriend(const QString& name,bool isOnline=true);
    void resizeCell(int startY);
private slots:
    void onCellStatuschange(bool isopen);
signals:
    void sigCellStatusChange(QQCell*cell);
private:
    QQCellTitle* m_friendtitle;
    QWidget*m_qqcellcontent;//放置line集合进入这个widget
    QList<QQCellLine*> m_celllines;//多个line
    int m_groupcount;//好友个数
    int m_onlinecount;//在线好友
    bool m_isOpen;
    int offsetCellY;//新的cell产生，用计算放置位置

};

#endif // QQCELL_H
